package com.fantabest.common.server;

import com.fantabest.common.client.LoginService;
import com.fantabest.common.entity.Manager;
import com.fantabest.common.server.dao.ManagerDao;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class LoginServiceImpl extends RemoteServiceServlet implements
		LoginService {

	public Manager login(String email, String pwd) {
		return ManagerDao.getInstance().load(email, pwd);
	}

	public String registerUser(String name, String surname, String nickname,
			String email, String pwd) {
		ManagerDao.getInstance().save(name, surname, nickname, email, pwd);
		return "success";
	}
}
